Nathan,
I was able to reproduce this behaviour exactly as described ...
In my case the server has transaction logging enabled.
The problem is only linked to the save-method in the agent, not with the ComputeWithForm or any other action. I did the test as folowing :
- New db from scratch, 1 form with 2 text fields "A" and "B"
- Create 3 documents with this form
- Create agent with folowing code :
Dim s As New Notessession
Dim db As Notesdatabase
Dim dc As Notesdocumentcollection
Dim doc As Notesdocument
Set db = s.CurrentDatabase
Set dc = db.AllDocuments
Set doc = dc.GetFirstdocument
Do While Not(doc Is Nothing)
Stop
doc.Save True, True
Set doc = dc.GetNextdocument(doc)
Loop
When I start the agent, and the agent halts in the debugger at the Stop statement, I change one document and save it. Then I let the agent continue. The changes I did make to the document are lost.
If I use folowing code:
Dim s As New Notessession
Dim db As Notesdatabase
Dim dc As Notesdocumentcollection
Dim doc As Notesdocument
Set db = s.CurrentDatabase
Set dc = db.AllDocuments
Set doc = dc.GetFirstdocument
Do While Not(doc Is Nothing)
Stop
call savesub(db, doc.NoteID)
Set doc = dc.GetNextdocument(doc)
Loop
Public Sub savesub(db as NotesDatabase, NoteID as String)
Dim d as NotesDocument
Set d=db.GetDocumentByID(NoteID)
Call d.Save True, True
End Sub
Then the changes are not lost. If I place the code from within the subroutine directly in the Do While loop, it doesn't work!


. . . . . . . . . . . . RE: working as expected, no bug at ... (~Dan Brefreepul... 9.Oct.03) 